home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / gem / l_0799 / 743 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  10.8 KB

  1. From: Lexicor@world.std.com
  2. From: Goemon <goemon@venice.mps.ohio-state.edu>
  3. From:     Lexicor
  4. Date: Mon, 11 Jul 1994 12:21:08 -0400 (EDT)
  5. Date: Mon, 11 Jul 94 2:18:57 EDT
  6. Subject: Gem List (fwd)
  7. Subject: Gem List
  8. Subject:  Re: Gem Listing (fwd)
  9. Subject:  Re: Gem List (fwd) from goemon
  10. Subject:  Re: Gemlist
  11. Subject: App_defs.sys
  12. Date: Mon, 11 Jul 1994 12:21:08 -0400 (EDT)
  13. Mime-Version: 1.0
  14. Precedence: bulk
  15.  
  16. Forwarded message:
  17. >From goemon@venice.mps.ohio-state.edu Mon Jul 11 02:19:03 1994
  18. From: Goemon <goemon@venice.mps.ohio-state.edu>
  19. Message-Id: <9407110618.AA17521@venice.mps.ohio-state.edu>
  20. Subject: Gem List
  21. To: gem-list-approval@world.std.com
  22. Date: Mon, 11 Jul 94 2:18:57 EDT
  23.  
  24.  
  25. To: Gem List
  26. Subject:  Re: Gem Listing (fwd)
  27.  
  28. ]The only time this will happen is when the application is topped. If it's
  29. ]not topped, then a click in one of the windows will send an event to
  30. ]the app to "wake up".
  31. ]
  32. ]Even so, the overhead is *miniscule*. I've got it in my head to write a
  33. ]benchmark program to compare overheads of different methods, and put this
  34. ]argument to rest permanently.
  35.  
  36. >You're missing the point.  If the OS has a large rectangle to compare 
  37. >against, and the mouse moves, it only has to check a few numbers.  ONLY 
  38. >when the OS finds the pointer entering or leaving the rectangle does it 
  39. >have to go back to your program.
  40.  
  41. You forget that the CPU generates an interrupt every time the mouse moves
  42. anyways. Simply moving the mouse on a normal ST can take up to 25% of
  43. CPU time. The time that objc_find uses is minscule in comparison. I don't
  44. see a problem here :-)
  45.  
  46. Programs that are running in the background will only be receiving a
  47. fractional amont of the events anyways -- only things like timer events
  48. and such. The topped application *ALWAYS* gets event priorities.
  49. And if you think about it, this makes sense. You want the topped application
  50. to be as responsive as possible, and for the background apps to receive
  51. the remaining cpu time available.
  52.  
  53. >If you use a 1-pixel rectangle, then EVERY mouse movement goes back to 
  54. >your program, and your program has to do an objc_find, EVERY TIME.
  55.  
  56. We're not using "1 pixel rectangles" like you seem to enjoy saying alot :-)
  57. You can get the current mouse pointer coordinates by any method you like --
  58. as you will see in the example code, that part was specifically left "open".
  59.  
  60. You are perfectly free to get the mouse coords with any method you like.
  61. If you want to make your life difficult by walking internal trees yourself,
  62. go ahead. It's your sanity at stake, not mine. However, the effort required
  63. to do this, and the *minimal* amount of CPU time it would save (if any) is
  64. not worth it.
  65.  
  66. >In a single-tasking environment, it doesn't matter which you do, but in a 
  67. >multitasking environment, the OS having to go back to your program for 
  68. >EVERY mouse movement creates a tremendous amount of overhead that is very 
  69. >wasteful.  Compare running your code for every 1 mouse movement to 
  70. >running your code for every 20 mouse movements.
  71.  
  72. You have to understand how GEM works before you can bring up an argument
  73. like this. The fact is that not every application will get a mouse event
  74. unless they write their own mouse routine (not everyone is willing to do :-).
  75.  
  76. With most programs you have to have the application TOPPED in order to
  77. receive ANY type of mouse related events, and in this case it also makes
  78. sense. Why watch mouse events for a background window? You try writing a
  79. program that will get mouse events in the background and find out how
  80. difficult it is. :-) You would have to watch every event that comes through
  81. AES for *ANY* program, and decipher whether it's for you or for some other
  82. application. That's why nobody does this. It's just a pain in the ass, and
  83. not worth the effort.
  84.  
  85. It doesn't have to go back to our program for every mouse movement. In fact,
  86. it CAN'T unless the application is topped.
  87.  
  88. >The OS code has to run every time, but your code doesn't because it only 
  89. >needs to know about certain entries/exist, and to call your EXTRA CODE 
  90. >repeatedly to do nothing but realize that it needn't do anything is wasteful.
  91.  
  92. There is another problem here -- our library allows you to set multiple
  93. timer events and 'attach' them to windows. If we set our event_timer to
  94. wait for rectangle events, then the timers would become effectively
  95. useless. The library does need to do events on a regular basis, but only
  96. mouse events will be done if the application is TOPPED.
  97.  
  98. This message thread is getting rather old, and I *STILL* don't understand why
  99. we're arguing about this. It doesn't make any sense at all, so I'm dropping
  100. the issue now.
  101.  
  102. -Goemon
  103. -----
  104. Subject:  Re: Gem List (fwd) from goemon
  105.  
  106. Warwick:
  107. --------
  108. I think you misunderstood the nature of the program I was coding in the first
  109. place.  I am using a method of task-switching multitasking timers in my
  110. GUI library, and if I were to do the method YOU have been talking about,
  111. the timers would stop.  No matter what is the case, I will still have to
  112. "busy-wait" as you called it.  There is no other alternative, unless you
  113. wish for the timers to come to a halt until the mouse exits a rectangle.
  114.  
  115. >>That's the problem.  Not all GEM libraries are the same.  Why not use
  116. >>Extended Object Types?
  117. >Because GEM++ can support thousands of different object types.  It focusses
  118. >on behavioural objects rather than visual objects (eg. there are no different
  119. >types of visual radio buttons - just the std GEM ones), so there is no gain
  120. >in the WYSIWYG of RSC editing.
  121.  
  122. Warwick, are you SURE you understand what Extended Object Types are?  From
  123. the way you speak, it sounds like you have no idea why they were designed.
  124.  
  125. Extended object types can *easily* handle behavioural objects. Just look
  126. at WinLIB PRO's active sliders. Those are just normal everyday sliders, with
  127. the one addition that their extended object type is different.
  128.  
  129. You're saying that with Gem++ you would have to add code to support the
  130. active slider, perhaps doing something like "register_active_slider(TREE,
  131. object, orientation);" which is insane. Having to write code to support
  132. an interface when the interface should do those things ITSELF is a pain.
  133.  
  134. Besides the fact that if you want to change the functionality of a button,
  135. you can't do it visually, you have to do it programatically. This is right
  136. along the lines of insanity that MultiTOS did when they forced you to do
  137. heirarchical menus by linking them together within your code, rather than
  138. the *obvious* way of allowing you to design heirarchical menus using
  139. a resource editor.
  140.  
  141. If you want to make a quick change to your interface, with Gem++ you would
  142. have to recompile the code. With all other libraries it's just a quick dip
  143. into a resource editor to make that change.
  144.  
  145. To me, this seems like an *ENORMOUS* disadvantage of Gem++, as it is with
  146. MultiTOS. A library is supposed to make coding easier, not more difficult.
  147.  
  148. Is it any wonder why nobody has used Gem++ for anything yet? :-)
  149.  
  150. -- Ken Hollis
  151. (Bitgate Software)
  152. -----
  153. From:     Lexicor
  154. Subject:  Re: Gemlist
  155.  
  156. Yat:
  157. ----
  158. >    you subscribed as kollis@bitsink.gbdata.com is that correct? Well
  159. >no wonder the gem-list bounces your email from venice, as you are not
  160. >subscribed to venice.
  161. Then register goemon@venice.mps.ohio-state.edu, dammit! :-)
  162.  
  163. -- Ken Hollis
  164. (Bitgate Software)
  165. -----
  166. Subject: App_defs.sys
  167.  
  168. > > Now look deeper into the problem.  Say, 50% or programmers support the
  169. > > App-defs file and 50% of the apps only use the level #1 standard.  A user
  170. > > could then have most of his apps configurable, and he can change those
  171. > > keys, but if he changes from the defaults, the other half of his
  172. > > applications will not use the same keyboard short-cuts!!  This is not _A_
  173. > > standard as it creates TWO incompatible standards.  The only way the
  174. > Yes. The app-defs file must be either abandoned or made compulsory. I'm
  175. > inclined to agree with you but the problem with this is that lazy programmers
  176. > will ignore it and just stick with the Atari standard shortcuts, with the same
  177. > problems as if both standards were allowed.
  178.  
  179. > > beyond the scope of the GEM-List.  The GEM-List only supplements ATARI's
  180. > > documentation.
  181. > And replaces part of it. But yes it should be read in conjunction with Atari's.
  182. It's more like a quick programmer's index for all of AES. Just like my
  183. Hardware Register Listing was a quick programmer's index for all atari's. :-)
  184.  
  185. > > If you have AES 3.4 or greater, you should check and see what features
  186. > > are present in the system using appl_getinfo().
  187. > Isn't this only in aes >= 4.00? Or is this another bug in the Compendium?
  188.  
  189. No. appl_getinfo() is AES 3.4 or greater. If you had *READ THE GEM MASTER
  190. LISTING* you would have seen this instantly. Do you see *NOW* why the listing
  191. was created? :-)
  192.  
  193. > Necessary for MultiTOS. Lattice C documentation didn't include this which is
  194. > why a lot of old programs failed under MultiTOS.
  195.  
  196. May not be necessary, but it's desired.  Remember, you're trying to keep
  197. the program as compatible as possible.  If you don't use wind_update, then
  198. when you move your mouse to the menu-bar, the program will lock up,
  199. guaranteed.
  200.  
  201. > Except that apps should be non-modal now IMO. But those that are modal should
  202. > use form_do I agree.
  203.  
  204. Tell the older programs that.  :)
  205.  
  206. > Thanks for posting this, it was interesting. BTW, you mention three button
  207. > mice, I knew GEM supported three (and up to 8 :) button mice but I had never
  208. > heard of anyone fitting one. What should a program do with middle button
  209. > clicks?
  210.  
  211. Who's going to SUPPORT 3 button mice on the Atari ST, anyway?  It's just
  212. another worthless design.  Hell, even 3 button mice are hardly supported on
  213. the IBM.
  214.  
  215. > And when they aren't the users fault it can still be an error anyway. `Fatal
  216. > disc <small problem absolutely not your fault...>'
  217.  
  218. Nice touch.  @_@
  219.  
  220. >Can not is actually incorrect. It suggests you have the option of not doing it
  221. >if you like :) Cannot is correct English, but why can't isn't allowed I don't
  222. >know.
  223.  
  224. Imagine the following C code:
  225.  
  226. do_alert("[1][You are currently in directory C:\DEMO\SLASH\FILES][OK]",1);
  227.  
  228. or the following Pascal code:
  229.  
  230. do_alert('[1][I'm sorry, but you can't do that.][OK]',1);
  231.  
  232. Because can't has an apostrophe in it (') which just happens to be the
  233. quotation character for Pascal. The same reason why slashes are discouraged
  234. from being used in strings.
  235.  
  236. Now that I pointed out the problem, I'm sure you can see why the above code
  237. fails. However, if I hadn't pointed it out ahead of time, lots of people
  238. would have failed to catch the errors.
  239.  
  240. Similar restrictions are put on other GUI's. I believe Motif discourages
  241. use of apostrophes, as does the Macintosh (and Windows?).
  242.  
  243. > It's for use with things like libraries - if a library registers which extended
  244. > types it supports then programmers can switch libraries easily, and it allows
  245. > the use of aes extensions.
  246.  
  247. Man.  Why did I even post about registration of standards?  I knew it'd just
  248. start another stupid discussion.  Maybe I should have posted about that on
  249. comp.sys.atari.st...
  250.  
  251. -- Ken Hollis (Bitgate Software)
  252.  
  253.  
  254.  
  255.